/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.model.relations;

import org.jfonia.connect5.basics.MutableValueNode;
import org.jfonia.connect5.relations.ABRelation;

/**
 *
 * @author jannes
 */
public class ExclusiveFalseRelation extends ABRelation<Boolean, Boolean>{

    public ExclusiveFalseRelation(MutableValueNode<Boolean> a, MutableValueNode<Boolean> b){
        super(a, b);
    }

    @Override
    public void updateB() {
        if(!a.getValue()){
            b.setValue(true);
        }
    }

    @Override
    public void updateA() {
        if(!b.getValue()){
            a.setValue(true);
        }
    }

}
